package com.example.maoyanmovie.model;

import java.io.Serializable;
import java.util.List;

public class OrderInfo implements Serializable {
    private String movieName;
    private String cinemaName;
    private String showTime;
    private List<String> seatNames;
    private double totalPrice;

    public OrderInfo() {
    }

    public OrderInfo(String movieName, String cinemaName, String showTime, List<String> seatNames, double totalPrice) {
        this.movieName = movieName;
        this.cinemaName = cinemaName;
        this.showTime = showTime;
        this.seatNames = seatNames;
        this.totalPrice = totalPrice;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public String getCinemaName() {
        return cinemaName;
    }

    public void setCinemaName(String cinemaName) {
        this.cinemaName = cinemaName;
    }

    public String getShowTime() {
        return showTime;
    }

    public void setShowTime(String showTime) {
        this.showTime = showTime;
    }

    public List<String> getSeatNames() {
        return seatNames;
    }

    public void setSeatNames(List<String> seatNames) {
        this.seatNames = seatNames;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getSeatsString() {
        if (seatNames == null || seatNames.isEmpty()) {
            return "无";
        }
        return String.join(", ", seatNames);
    }
}
